<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>权限信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
	// 是否需要重新刷新页面
	var g_needReloadPage = false;
</script>
</head>
<body>
	<div>
		<span class="page_titile">权限信息</span>
	</div>

	<form method="get" action="list.do">
		<table class="input_table" align="center" cellspacing="0"
			cellpadding="0">
			<tr>
				<td class="input_titile_td">权限编号</td>
				<td class="input_content_td">
					<input type="text" name="permissionId" value="<c:out value='${permissionId}' />" />
				</td>
				<td class="input_titile_td">地址</td>
				<td class="input_content_td">
					<input type="text" name="uri" value="<c:out value='${uri}' />"/>
				</td>
				<br />
				<td class="input_titile_td">所属模块</td>
				<td class="input_content_td">
					<input type="text" name="module" value="<c:out value='${module}' />" />
			   	</td>

				<td class="input_content_td" align="center">
					<input type="submit" value=" 搜索 " />
				</td>
			</tr>
		</table>
	</form>


	<form:form method="get" action="list.do" name="frmTurnPage1">
		<input type="hidden" name="permissionId" value="<c:out value='${permissionId}' />" />
		<input type="hidden" name="uri" value="<c:out value='${uri}' />" />
		<input type="hidden" name="module" value="<c:out value='${module}' />" />
		<!-- 隐含变量 -->
		<jsp:include page="/WEB-INF/jsp/common/turnPage.jsp">
			<jsp:param name="formName" value="frmTurnPage1" />
		</jsp:include>
	</form:form>

	<form action="delRecords.do"
		onsubmit="return Util.confirmSelectedCheckboxes(this, 'checkAll', '请选择要删除的 记录信息', '确认要删除这些 记录信息吗?');">
		<div>
			&nbsp;&nbsp; <input type="submit" value=" 删除 " /> <a
				href="javascript: g_needReloadPage = true; Util.popupIframeCenter('popupDiv', 600, 500, 'popupTitle', '新增模块信息', 'popupIframe', 'showAdd.do');">新增</a>
		</div>


		<table class="records_table" align="center" cellspacing="0"
			cellpadding="0">
			<tr class="records_table_head">
				<td><input type="checkbox" id="checkAll"
					onclick="if (this.checked) Util.selectAllCheckbox(this.form); else Util.cancelAllCheckbox(this.form); " />
				</td>
				<td>权限编号</td>
				<td>地址</td>
				<td>所属模块</td>
				<td>备注</td>
				<td>创建时间</td>
				<td>修改时间</td>
				<td>操作</td>
			</tr>
			<c:forEach items="${pageData.resultList}" var="record">
				<tr class="records_table_record">
					<td><input type="checkbox" name="delIds"
						value="<c:out value='${record.permissionId}' />"
						onclick="Util.verifyCheckAll(this.form, 'checkAll');" /></td>
						
					<td><c:out value="${record.permissionId}" /></td>
					<td><c:out value="${record.uri}" /></td>
					<td><c:out value="${record.module}" /></td>
					<td><c:out value="${record.comment}" /></td>
					<td><fmt:formatDate value="${record.createTime}"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><fmt:formatDate value="${record.updateTime}"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><a
						href="javascript: g_needReloadPage = false; Util.popupIframeCenter('popupDiv', 600, 500, 'popupTitle', '模块信息', 'popupIframe', 'show.do?id=<c:out value="${record.permissionId}" />');">查看</a>
						| <a
						href="javascript: g_needReloadPage = true; Util.popupIframeCenter('popupDiv', 600, 500, 'popupTitle', '修改模块信息', 'popupIframe', 'showUpd.do?id=<c:out value="${record.permissionId}" />');">修改</a>
						| <a
						href="javascript: g_needReloadPage = true; Util.popupIframeCenter('popupDiv', 600, 500, 'popupTitle', '修改模块信息', 'popupIframe', 'permissionlist.do?id=<c:out value="${record.permissionId}" />');">分配权限</a>
					</td>
				</tr>
			</c:forEach>
		</table>

	</form>

	<form:form method="get" action="list.do" name="frmTurnPage2">
		<input type="hidden" name="permissionId"
			value="<c:out value='${permissionId}' />" />
		<!-- 隐含变量 -->
		<jsp:include page="/WEB-INF/jsp/common/turnPage.jsp">
			<jsp:param name="formName" value="frmTurnPage2" />
		</jsp:include>
	</form:form>


	<div id='popupDiv'
		style="position: absolute; z-index: 9999; width: 300px; height: 250; display: none;"
		class="popup_style">
		<div class="close"
			onclick="javascript: $('#popupDiv').hide(); if (g_needReloadPage) location.reload();"></div>
		<div class="title">
			<h2 id="popupTitle"></h2>
		</div>
		<div class="content">
			<iframe id="popupIframe" src="" frameborder="0" scrolling="auto"
				width="100%" height="100%"></iframe>
		</div>
	</div>


</body>
</html>
